package com.wanghua.mall.product.vo;

import com.wanghua.common.dto.SkuReductionDto;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author wanghua
 * @create 2021-08-25 11:26
 */
@Data
public class SpuSaveVo {
    //这一部分是SpuInfoEntity
    private String spuName;
    private String spuDescription;
    private Long categoryId;
    private Long brandId;
    private BigDecimal weight;
    private Integer publishStatus;
    //这一部分是SpuInfoDescEntity
    private List<String> description;
    //这一部分是SpuImagesEntity
    private List<String> images;
    //这一部分是SpuImagesEntity
    private Bounds bounds;
    //这一部分是SpuImagesEntity
    private List<BaseAttrList> baseAttrList;
    //这一部分是SpuImagesEntity
    private List<SkuList> skuList;

    @Data
    public static class Bounds {
        private BigDecimal growBounds;
        private BigDecimal buyBounds;
    }

    @Data
    public static class BaseAttrList {
        private Long attrId;
        private String attrValues;
        private Integer showDesc;
    }

    @Data
    public static class Attr {
        private Long attrId;
        private String attrName;
        private String attrValue;
    }

    @Data
    public static class Images {
        private String imgUrl;
        private Integer defaultImg;
    }

//    @Data
//    public static class UserPrice {
//        private Long id;
//        private String name;
//        private BigDecimal price;
//    }

    @Data
    public static class SkuList {
        private List<Attr> attr;
        private String skuName;//SkuInfoEntity
        private BigDecimal price;//SkuInfoEntity
        private String skuTitle;//SkuInfoEntity
        private String skuSubtitle;//SkuInfoEntity
        private List<Images> images;

        private List<String> descartes;//笛卡尔积
        private Integer fullCount;
        private BigDecimal discount;
        private Integer countStatus;
        private BigDecimal fullPrice;
        private BigDecimal reducePrice;
        private Integer priceStatus;
        private List<SkuReductionDto.UserPrice> userPrice;
    }
}
